<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cadastramento de Anúncio</title>
</head>
<body>
	<h3>Digite as Informações do Anúncio</h3>
	<f:view>
		<h:outputText id="o4" value="#{sessaoMB.mensagem}"
			rendered="#{sessaoMB.temMensagem}" style="color: #0000FF"></h:outputText>
		<h:form id="f1">
			<h:panelGrid id="p1" columns="2" border="1">
				<h:outputLabel id="o1" value="Decrição: "></h:outputLabel>
				<h:inputTextarea id="i1" value="#{sessaoMB.descricao}"></h:inputTextarea>

				<h:outputLabel id="o2" value="Valor (R$): "></h:outputLabel>
				<h:inputText id="i2" converter="javax.faces.Double"
					value="#{sessaoMB.valor}" required="true"></h:inputText>
			</h:panelGrid>

			<h:commandButton id="c1" value="Cadastrar Anúncio"
				action="#{sessaoMB.cadastrarAnuncio}"></h:commandButton>
			<br />
			<h:commandLink id="c2" value="Voltar" action="index.jsp"></h:commandLink>
		</h:form>
	</f:view>
</body>
</html>